package com.erp.app.admin.sysParam.beans;

//JRE Classes
import java.io.Serializable;
import java.util.ArrayList;

public final class SysParamList implements Serializable {
    public SysParamList() {

    }

    public SysParamList(ArrayList sysParamList) {
        setSysParamList(sysParamList);
    }

    private ArrayList sysParamList;

    public ArrayList getSysParamList() {
        return this.sysParamList;
    }

    public void setSysParamList(ArrayList sysParamList) {
        this.sysParamList = sysParamList;
    }

    public String getParamValById(String paramId) {
        String paramVal = "";

        if (paramId == null)
            return paramVal;
        if (sysParamList == null)
            return paramVal;

        int count = sysParamList.size();

        for (int i = 0; i < count; i++) {
            SysParamVO vo = (SysParamVO) sysParamList.get(i);
            if (vo == null)
                continue;

            if (paramId.equals(vo.getParamId())) {
                paramVal = vo.getParamVal();
                break;
            }
        }

        paramVal = (paramVal == null) ? "" : paramVal;

        return paramVal;
    }
}
